home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Libraries / Aidan's Class Libraries / Source / Graphics Classes / Line.cpp next >
Encoding:
Text File  |  1997-06-14  |  426 b   |  23 lines  |  [TEXT/CWIE]

  1. //Copyright (c) 1997 Aidan Cully
  2. //All rights reserved.
  3.  
  4. #include <QuickDraw.h>
  5. #include "CLStyle.h"
  6. #include "CLLine.h"
  7. #include "CLDrawSlate.h"
  8.  
  9. TLine::TLine( TStyle *style, short x1, short y1, short x2, short y2 ):
  10.     mStyle( style )
  11. {
  12.     mX1= x1; mY1= y1;
  13.     mX2= x2; mY2= y2;
  14. }
  15.  
  16. void TLine::RenderOn( TDrawSlate *gr )
  17. {
  18.     gr->GetDrawFocus();
  19.     mStyle->Apply();
  20.     MoveTo( mX1, mY1 );
  21.     LineTo( mX2, mY2 );
  22.     gr->ReleaseDrawFocus();
  23. }